<ion-popover-view>
    <ion-header-bar>
        <h1 class="title">添加施肥信息</h1>
    </ion-header-bar>
    <ion-content >
        <form name="fertilizerForm" novalidate="" ng-submit="fertilizerSubmitForm(detailForm)">
            <ion-list class="list">
                <label class="item item-radio">
                    <input type="radio" name="gender" value="基肥" ng-model="fertilizerInfo.type">

                    <div class="item-content">
                        基肥
                    </div>
                    <i class="radio-icon ion-checkmark"></i>
                </label>

                <label class="item item-radio">
                    <input type="radio" name="gender" value="追肥" ng-model="fertilizerInfo.type">

                    <div class="item-content">
                        追肥
                    </div>
                    <i class="radio-icon ion-checkmark"></i>
                </label>
                <insert-select form="fertilizerForm" option="subFertilizerOption"></insert-select>
                <insert-date form="fertilizerForm" dateoption="subDateOption"></insert-date>

                <label class="item item-input">
                    <span class="input-label">施肥数量（千克/亩）：</span>
                    <input type="text" name="fertilizer_quantity"
                           ng-model="fertilizerInfo.fertilizer_quantity"
                           ng-pattern='/^\d{1,8}([\.]\d{0,2})?$/'
                           ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }">
                </label>
                <!-- Error Container for Password -->
                <div class="validation-error"
                     ng-class="{'is-dirty':fertilizerForm.fertilizer_quantity.$dirty}"
                     ng-messages="fertilizerForm.fertilizer_quantity.$error" role="alert">
                    <div ng-messages-include="templates/system-templates/detail-errors.html"></div>
                </div>


                <label class="item item-input">
                    <span class="input-label">施肥方法：</span>
                    <input type="text" name="fertilization_method"
                           ng-model="fertilizerInfo.fertilization_method"
                           ng-maxlength=""
                           ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }">
                </label>
                <!-- Error Container for Password -->
                <div class="validation-error"
                     ng-class="{'is-dirty':fertilizerForm.fertilization_method.$dirty}"
                     ng-messages="fertilizerForm.fertilization_method.$error" role="alert">
                    <div ng-messages-include="templates/system-templates/detail-errors.html"></div>
                </div>

                <button class="button button-full button-positive item item-icon-left"
                        ng-disabled="fertilizerForm.$invalid" type="submit">添加
                    <i class="icon ion-plus-circled"></i>
                </button>

            </ion-list>
        </form>
    </ion-content>
</ion-popover-view>
<style>.popover { height:350px; width: 300px;top:5% !important; }</style>